<template>
	<article>
	<el-dialog  title="" width='70%' style="margin-top: -7vh;" size='small' visible :show-close="false" :append-to-body="true"    class="wrap" @close="cancel" :close-on-click-modal="false">
		
		<!--<el-dialog title="" width='70%' visible :modal-append-to-body="false" :modal='false' class="wrap">-->
			<i class="el-icon-close close" @click="cancel" style="color: white;z-index: 99;"></i>
			<div class="bt">职位权限设置</div>
			<!-- 默认展开 -->
			<!-- :default-expanded-keys="this.params.row.auth.split(',')" -->
			<div class="wrap">
				<div class="qcfd">
					<div style="text-align: center;">
						<el-button type="danger" @click="cancel">退出</el-button>
						<el-button type="primary" @click="getCheckedKeys">保存</el-button>
					</div>
					<div class="xxx" style="float: left;width: 20%;">
						<div class="wpfl" style="text-align: center;font-size: 16px;background: #C0CCDA;color: white;line-height: 30px;">职位名称</div>
						<div class="wpfltj">
							<el-button type="success" size="small" class="add btn" style='margin-top:10px;background:#50BFFF;border: none;' @click='componentsShow("fladd")' icon="edit">+ 添加职位分类</el-button>
						</div>
						<div class="xh" style="padding-top: 50px;width: 100%;height: 100%;border: 1px solid#CCCCCC;">
							<div v-for='v in comboxlist' :class="v.classname" style="border: 1px solid #CCCCCC;overflow: hidden;">
								<div class="jclt" @click="wpbtnclick(v.code)" >{{v.mc}}</div>
								<el-button style="width:20px; height: 50px;"  v-if='v.issys== "Y" ? false : true' type="text" @click="componentsShow('fledit',v)" icon="el-icon-edit"></el-button>
							</div>
						</div>
					</div>
					<table style="float:left;margin-left:20px;width: 70%;">
						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">行政模块 </div>
		                        <el-checkbox  v-model="xzqx" style="float: left;margin-left: 20px;" @change="checkall1()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c001x" class="check2" style='margin-left: 30px;'>新生报名</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c002x" class="check2">老生续费</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c049x" class="check2">催缴补交</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c003x" class="check2">学生档案</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c062x" class="check2">学生转校</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c004x" class="check2">退费退学</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c061x" class="check2">物品退费</el-checkbox>
								<!--<el-checkbox label="frmysbjallyn" v-model="qxbtn.c005x" class="check2">休学办理</el-checkbox>-->
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c006x" class="check2">发送通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c007x" class="check2">发起评价</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c008x" class="check2">评价模板设置</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c047x" class="check2">休课名单</el-checkbox>
							</td>
						</tr>

						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">教务管理 </div>
		                        <el-checkbox  v-model="jwqx" style="float: left;margin-left: 20px;" @change="checkall2()" >全选</el-checkbox>
							</td>
						</tr>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c009x" class="check2" style='margin-left: 30px;'>预设班级</el-checkbox>
							    <el-checkbox label="frmysbjaddyn" v-model="qxbtn.c060x" class="check2">查看所有预设班级</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c048x" class="check2">正式班级</el-checkbox>
							    <el-checkbox label="frmysbjaddyn" v-model="qxbtn.c059x" class="check2">查看所有正式班级</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c010x" class="check2">全校课表</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c011x" class="check2">老师课表</el-checkbox>
								<!--<el-checkbox label="frmysbjallyn" v-model="qxbtn.c012x" class="check2">教室课表</el-checkbox>-->
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c013x" class="check2">作业设置</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c014x" class="check2">补课安排</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c046x" class="check2">学生导入</el-checkbox>
							</td>
						</tr>

						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">财务模块 </div>
		                        <el-checkbox  v-model="cwqx" style="float: left;margin-left: 20px;" @change="checkall3()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c015x" class="check2" style='margin-left: 30px;'>缴费审核</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c016x" class="check2">退费审核</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c017x" class="check2">支出费用登记</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c018x" class="check2">老师课时结算</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c019x" class="check2">收支流水</el-checkbox>
							</td>
						</tr>

						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">进销存</div>
		                        <el-checkbox  v-model="jxcqx" style="float: left;margin-left: 20px;" @change="checkall4()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c020x" class="check2" style='margin-left: 30px;'>教材库存</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c021x" class="check2">固定资产</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c022x" class="check2">办公用品</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c064x" class="check2">库存审核</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c065x" class="check2">教材拆分合并</el-checkbox>
							</td>
						</tr>

						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">基础设置</div>
		                        <el-checkbox  v-model="jcqx" style="float: left;margin-left: 20px;" @change="checkall5()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c030x" class="check2" style='margin-left: 30px;'>职位权限</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c031x" class="check2">人事设置</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c032x" class="check2">教室设置</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c033x" class="check2">节假日设置</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c034x" class="check2">学生标签管理</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c035x" class="check2">学校信息设置</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c036x" class="check2">基础参数设置</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c066x" class="check2">系统配置</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c067x" class="check2">通知消息模板</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c037x" class="check2">物品价格设置</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c038x" class="check2">课程价格设置</el-checkbox>
							</td>
						</tr>

						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">统计分析</div>
		                        <el-checkbox  v-model="tjqx" style="float: left;margin-left: 20px;" @change="checkall6()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c039x" class="check2" style='margin-left: 30px;'>流失统计</el-checkbox>
								<!--<el-checkbox label="frmysbjallyn" v-model="qxbtn.c040x" class="check2">评价老师统计</el-checkbox>-->
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c041x" class="check2">考试成绩统计</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c042x" class="check2">人数统计</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c043x" class="check2">考勤统计</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c044x" class="check2">收入统计</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c045x" class="check2">支出统计</el-checkbox>
								<el-checkbox label="frmysbjaddyn" v-model="qxbtn.c063x" class="check2">财务日报</el-checkbox>
							</td>
						</tr>
						
						<tr>
							<td>
								<div style="font-weight: bold;font-size:16px ;color: black;float: left;">消息通知</div>
		                        <el-checkbox  v-model="xxtz" style="float: left;margin-left: 20px;" @change="checkall7()" >全选</el-checkbox>
							</td>
						</tr>
						<tr>
							<td>
							    <el-checkbox label="frmysbjallyn" v-model="qxbtn.c058x" class="check2" style='margin-left: 30px;'>退费审核通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c050x" class="check2">采购入库审核通知</el-checkbox>
							    <el-checkbox label="frmysbjaddyn" v-model="qxbtn.c057x" class="check2">缴费审核通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c051x" class="check2">采购退货审核通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c052x" class="check2">报损审核通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c053x" class="check2">盘点审核通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c054x" class="check2">教材学习用品库存预警通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c055x" class="check2">固定资产库存预警通知</el-checkbox>
								<el-checkbox label="frmysbjallyn" v-model="qxbtn.c056x" class="check2">办公用品库存预警通知</el-checkbox>
							</td>
						</tr>

					</table>
					<LoadingComponent v-show="isLoading"></LoadingComponent>
					<FleditComponent v-if="portComponents.fledit.toggle" @close="componentsHide" :params="portComponents.fledit.params"></FleditComponent>
					<FladdComponent v-if="portComponents.fladd.toggle" @close="componentsHide"></FladdComponent>
				</div>

			</div>
		</el-dialog>
	</article>
</template>

<script type="text/javascript">
	import qs from 'qs'
	import LoadingComponent from 'components/loading'
	import FleditComponent from './fledit'
	import FladdComponent from './fladd'
	export default {
		components: {
			LoadingComponent,
			FleditComponent,
			FladdComponent,
		},

		props: ['params'],
		data() {
			return {
				xzqx:'',
				jwqx:'',
				cwqx:'',
				jxcqx:'',
				jcqx:'',
				tjqx:'',
				xxtz:'',
				
				//全选
				bmjfqx: '', //报名缴费
				jxcqx: '', //进销存管理
				htqx: '', //后台设置
				lslx: 'ls',
				color: 'fff',
				str: '',
				comboxlist: [],
				qxbtn: {
					c001x: false,
					c002x: false,
					c003x: false,
					c004x: false,
					c005x: false,
					c006x: false,
					c007x: false,
					c008x: false,
					c009x: false,
					c010x: false,
					c011x: false,
					c012x: false,
					c013x: false,
					c014x: false,
					c015x: false,
					c016x: false,
					c017x: false,
					c018x: false,
					c019x: false,
					c020x: false,
					c021x: false,
					c022x: false,
					c030x: false,
					c031x: false,
					c032x: false,
					c033x: false,
					c034x: false,
					c035x: false,
					c036x: false,
					c037x: false,
					c038x: false,
					c039x: false,
//					c040x: false,
					c041x: false,
					c042x: false,
					c043x: false,
					c044x: false,
					c045x: false,
					c046x: false,
					c047x: false,
					c048x: false,
					c049x: false,
					c050x: false,
					c051x: false,
					c052x: false,
					c053x: false,
					c054x: false,
					c055x: false,
					c056x: false,
					c057x: false,
					c058x: false,
                    c059x: false,
					c060x: false,
					c061x: false,
					c062x: false,
					c063x: false,
					c064x: false,
					c065x: false,
					c066x: false,
					c067x: false,
				},

				bol: true,
				checkList: [],
				isLoading: true, //动画加载
				/*组件区域*/
				portComponents: {
					/* 单行删除  */
					singleDelete: {
						type: 'singleDelete',
						toggle: false,
						params: '',
						data: {
							index: '',
							type: 'single',
							title: '此操作将删除该记录?, 是否继续?'
						}
					},
					/* 批量删除 */
					multipleDelete: {
						type: 'multipleDelete',
						toggle: false,
						params: '',
						data: {
							index: '',
							type: 'multiple',
							title: '此操作将删除您选中的记录?, 是否继续?'
						}
					},
					/* 添加 */
					add: {
						type: 'add',
						toggle: false,
						params: '',
						data: {},
						flid: '',
					},
					/* 编辑 */
					edit: {
						type: 'edit',
						toggle: false,
						params: '',
						data: {}
					},
					/* info */
					info: {
						type: 'info',
						toggle: false,
						params: '',
						data: {}
					},
					del: {
						type: 'del',
						toggle: false,
						params: '',
						data: {}
					},
					/* peijian */
					peijian: {
						type: 'peijian',
						toggle: false,
						params: '',
						data: {}
					},
					/* pjxq */
					pjxq: {
						type: 'pjxq',
						toggle: false,
						params: '',
						data: {}
					},
					wpcrjl: {
						type: 'wpcrjl',
						toggle: false,
						params: '',
						data: {}
					},
					fladd: {
						type: 'fladd',
						toggle: false,
						params: '',
						data: {},
					},
					fledit: {
						type: 'fledit',
						toggle: false,
						params: '',
						data: {}
					},
					plwp: {
						type: 'plwp',
						toggle: false,
						params: '',
						data: {}
					}
				},
			}
		},
		created() {
			this.getcomboxlist();
			this.isLoading = true; //动画开始
		},
		mounted() {
			//加载完成之后event
			this.isLoading = false; //动画结束
		},
		methods: {
			wpbtnclick(code) {
				this.lslx = code;
				for(let i in this.comboxlist) {
					this.comboxlist[i].classname = 'fff';
					if(this.comboxlist[i].code == this.lslx) {
						this.comboxlist[i].classname = 'red';
						this.str = this.comboxlist[i].auth;
						this.setqxstr(this.str);
					}
				}
			},
			getcomboxlist() {
				var logininfo = JSON.parse(localStorage.logininfo);
				this.searchLoading = true;
				var params2 = qs.stringify({
					yhid: logininfo.id,
					xxid: logininfo.xxid
				})
				//执行
				this.axios.post(this.$store.state.api + 'lstype/getlist', params2)
					.then(res => {
						let data = res.data.data;
						let list = data.list;
						this.comboxlist = list;
                         //第一次默认为ls
						for(let i in this.comboxlist) {
							this.comboxlist[i].classname = 'fff';
							if(this.comboxlist[i].code == this.lslx) {
								this.comboxlist[i].classname = 'red';
								this.str = this.comboxlist[i].auth;
								this.setqxstr(this.str);
							}
						}

					}).catch(res => {
						this.searchLoading = false;
					})
			},
			setqxstr(qxstr) {
				this.qxbtn.c001x = this.isexists(qxstr, "c001x");
				this.qxbtn.c002x = this.isexists(qxstr, "c002x");
				this.qxbtn.c003x = this.isexists(qxstr, "c003x");
				this.qxbtn.c004x = this.isexists(qxstr, "c004x");
				this.qxbtn.c005x = this.isexists(qxstr, "c005x");
				this.qxbtn.c006x = this.isexists(qxstr, "c006x");
				this.qxbtn.c007x = this.isexists(qxstr, "c007x");
				this.qxbtn.c008x = this.isexists(qxstr, "c008x");
				this.qxbtn.c009x = this.isexists(qxstr, "c009x");
				this.qxbtn.c010x = this.isexists(qxstr, "c010x");
				this.qxbtn.c011x = this.isexists(qxstr, "c011x");
				this.qxbtn.c012x = this.isexists(qxstr, "c012x");
				this.qxbtn.c013x = this.isexists(qxstr, "c013x");
				this.qxbtn.c014x = this.isexists(qxstr, "c014x");
				this.qxbtn.c015x = this.isexists(qxstr, "c015x");
				this.qxbtn.c016x = this.isexists(qxstr, "c016x");
				this.qxbtn.c017x = this.isexists(qxstr, "c017x");
				this.qxbtn.c018x = this.isexists(qxstr, "c018x");
				this.qxbtn.c019x = this.isexists(qxstr, "c019x");
				this.qxbtn.c020x = this.isexists(qxstr, "c020x");
				this.qxbtn.c021x = this.isexists(qxstr, "c021x");
				this.qxbtn.c022x = this.isexists(qxstr, "c022x");
				this.qxbtn.c030x = this.isexists(qxstr, "c030x");
				this.qxbtn.c031x = this.isexists(qxstr, "c031x");
				this.qxbtn.c032x = this.isexists(qxstr, "c032x");
				this.qxbtn.c033x = this.isexists(qxstr, "c033x");
				this.qxbtn.c034x = this.isexists(qxstr, "c034x");
				this.qxbtn.c035x = this.isexists(qxstr, "c035x");
				this.qxbtn.c036x = this.isexists(qxstr, "c036x");
				this.qxbtn.c037x = this.isexists(qxstr, "c037x");
				this.qxbtn.c038x = this.isexists(qxstr, "c038x");
				this.qxbtn.c039x = this.isexists(qxstr, "c039x");
//				this.qxbtn.c040x = this.isexists(qxstr, "c040x");
				this.qxbtn.c041x = this.isexists(qxstr, "c041x");
				this.qxbtn.c042x = this.isexists(qxstr, "c042x");
				this.qxbtn.c043x = this.isexists(qxstr, "c043x");
				this.qxbtn.c044x = this.isexists(qxstr, "c044x");
				this.qxbtn.c045x = this.isexists(qxstr, "c045x");
				this.qxbtn.c046x = this.isexists(qxstr, "c046x");
				this.qxbtn.c047x = this.isexists(qxstr, "c047x");
				this.qxbtn.c048x = this.isexists(qxstr, "c048x");
				this.qxbtn.c049x = this.isexists(qxstr, "c049x");
				this.qxbtn.c050x = this.isexists(qxstr, "c050x");
				this.qxbtn.c051x = this.isexists(qxstr, "c051x");
				this.qxbtn.c052x = this.isexists(qxstr, "c052x");
				this.qxbtn.c053x = this.isexists(qxstr, "c053x");
				this.qxbtn.c054x = this.isexists(qxstr, "c054x");
				this.qxbtn.c055x = this.isexists(qxstr, "c055x");
				this.qxbtn.c056x = this.isexists(qxstr, "c056x");
				this.qxbtn.c057x = this.isexists(qxstr, "c057x");
				this.qxbtn.c058x = this.isexists(qxstr, "c058x");
				this.qxbtn.c059x = this.isexists(qxstr, "c059x");
				this.qxbtn.c060x = this.isexists(qxstr, "c060x");
				this.qxbtn.c061x = this.isexists(qxstr, "c061x");
				this.qxbtn.c062x = this.isexists(qxstr, "c062x");
				this.qxbtn.c063x = this.isexists(qxstr, "c063x");
				this.qxbtn.c064x = this.isexists(qxstr, "c064x");
				this.qxbtn.c065x = this.isexists(qxstr, "c065x");
				this.qxbtn.c066x = this.isexists(qxstr, "c066x");
				this.qxbtn.c067x = this.isexists(qxstr, "c067x");
			},
			isexists(str, tag) {
				try {
					if(str.indexOf(tag) != -1)
						return true;
					else
						return false;
				} catch(e) {
					return false;
				}
			},
			search() {},
			cancel() {
				this.$emit('close', {
					type: 'ryqxsz',
					cancel: true
				})
			},
			getCheckedKeys() {

				var str = "";
				if(this.qxbtn.c001x) str += "c001x,";
				if(this.qxbtn.c002x) str += "c002x,";
				if(this.qxbtn.c003x) str += "c003x,";
				if(this.qxbtn.c004x) str += "c004x,";
				if(this.qxbtn.c005x) str += "c005x,";
				if(this.qxbtn.c006x) str += "c006x,";
				if(this.qxbtn.c007x) str += "c007x,";
				if(this.qxbtn.c008x) str += "c008x,";
				if(this.qxbtn.c009x) str += "c009x,";
				if(this.qxbtn.c010x) str += "c010x,";
				if(this.qxbtn.c011x) str += "c011x,";
				if(this.qxbtn.c012x) str += "c012x,";
				if(this.qxbtn.c013x) str += "c013x,";
				if(this.qxbtn.c014x) str += "c014x,";
				if(this.qxbtn.c015x) str += "c015x,";
				if(this.qxbtn.c016x) str += "c016x,";
				if(this.qxbtn.c017x) str += "c017x,";
				if(this.qxbtn.c018x) str += "c018x,";
				if(this.qxbtn.c019x) str += "c019x,";
				if(this.qxbtn.c020x) str += "c020x,";
				if(this.qxbtn.c021x) str += "c021x,";
				if(this.qxbtn.c022x) str += "c022x,";
				if(this.qxbtn.c030x) str += "c030x,";
				if(this.qxbtn.c031x) str += "c031x,";
				if(this.qxbtn.c032x) str += "c032x,";
				if(this.qxbtn.c033x) str += "c033x,";
				if(this.qxbtn.c034x) str += "c034x,";
				if(this.qxbtn.c035x) str += "c035x,";
				if(this.qxbtn.c036x) str += "c036x,";
				if(this.qxbtn.c037x) str += "c037x,";
				if(this.qxbtn.c038x) str += "c038x,";
				if(this.qxbtn.c039x) str += "c039x,";
//				if(this.qxbtn.c040x) str += "c040x,";
				if(this.qxbtn.c041x) str += "c041x,";
				if(this.qxbtn.c042x) str += "c042x,";
				if(this.qxbtn.c043x) str += "c043x,";
				if(this.qxbtn.c044x) str += "c044x,";
				if(this.qxbtn.c045x) str += "c045x,";
				if(this.qxbtn.c046x) str += "c046x,";
				if(this.qxbtn.c047x) str += "c047x,";
				if(this.qxbtn.c048x) str += "c048x,";
				if(this.qxbtn.c049x) str += "c049x,";
				if(this.qxbtn.c050x) str += "c050x,";
				if(this.qxbtn.c051x) str += "c051x,";
				if(this.qxbtn.c052x) str += "c052x,";
				if(this.qxbtn.c053x) str += "c053x,";
				if(this.qxbtn.c054x) str += "c054x,";
				if(this.qxbtn.c055x) str += "c055x,";
				if(this.qxbtn.c056x) str += "c056x,";
				if(this.qxbtn.c057x) str += "c057x,";
				if(this.qxbtn.c058x) str += "c058x,";
				if(this.qxbtn.c059x) str += "c059x,";
				if(this.qxbtn.c060x) str += "c060x,";
				if(this.qxbtn.c061x) str += "c061x,";
				if(this.qxbtn.c062x) str += "c062x,";
				if(this.qxbtn.c063x) str += "c063x,";
				if(this.qxbtn.c064x) str += "c064x,";
				if(this.qxbtn.c065x) str += "c065x,";
				if(this.qxbtn.c066x) str += "c066x,";
				if(this.qxbtn.c067x) str += "c067x,";

				//学校基本设置 
				var logininfo = JSON.parse(localStorage.logininfo);
				var params2 = qs.stringify({
					xxid: logininfo.xxid,
					id: this.lslx,
					auth: str,
					yhid: logininfo.id,
					lx:'1',
					xxid: logininfo.xxid,
				})
				//执行
				this.axios.post(this.$store.state.api + 'lstype/update', params2)
					.then(res => {
						this.$emit('close', {type: 'ryqxsz',cancel: false});
						this.$message.success('修改权限成功！');
						for(let i in this.comboxlist) {
							if(this.comboxlist[i].code == this.lslx) {
								this.comboxlist[i].classname = 'red';
								this.comboxlist[i].auth = str;
							}
						}
					})
			},
			checkall1() { //点击全选select触发事件
				//行政
				this.qxbtn.c001x = this.xzqx;
				this.qxbtn.c002x = this.xzqx;
				this.qxbtn.c003x = this.xzqx;
				this.qxbtn.c004x = this.xzqx;
				this.qxbtn.c005x = this.xzqx;
				this.qxbtn.c006x = this.xzqx;
				this.qxbtn.c007x = this.xzqx;
				this.qxbtn.c008x = this.xzqx;
				this.qxbtn.c049x = this.xzqx;
				this.qxbtn.c047x = this.xzqx;
				this.qxbtn.c061x = this.xzqx;
				this.qxbtn.c062x = this.xzqx;
			},

			checkall2() {
				//教务
				this.qxbtn.c009x = this.jwqx;
				this.qxbtn.c010x = this.jwqx;
				this.qxbtn.c011x = this.jwqx;
				this.qxbtn.c012x = this.jwqx;
				this.qxbtn.c013x = this.jwqx;
				this.qxbtn.c014x = this.jwqx;
				this.qxbtn.c046x = this.jwqx;
				this.qxbtn.c048x = this.jwqx;
				this.qxbtn.c059x = this.jwqx;
				this.qxbtn.c060x = this.jwqx;
			},

			checkall3() {
				//财务
				this.qxbtn.c015x = this.cwqx;
				this.qxbtn.c016x = this.cwqx;
				this.qxbtn.c017x = this.cwqx;
				this.qxbtn.c018x = this.cwqx;
				this.qxbtn.c019x = this.cwqx;
			},
			checkall4() {
				//进销存
				this.qxbtn.c020x = this.jxcqx;
				this.qxbtn.c021x = this.jxcqx;
				this.qxbtn.c022x = this.jxcqx;
				this.qxbtn.c064x = this.jxcqx;
				this.qxbtn.c065x = this.jxcqx;
			},
			checkall5() {
				//基础设置
				this.qxbtn.c030x = this.jcqx;
				this.qxbtn.c031x = this.jcqx;
				this.qxbtn.c032x = this.jcqx;
				this.qxbtn.c033x = this.jcqx;
				this.qxbtn.c034x = this.jcqx;
				this.qxbtn.c035x = this.jcqx;
				this.qxbtn.c036x = this.jcqx;
				this.qxbtn.c037x = this.jcqx;
				this.qxbtn.c038x = this.jcqx;
				this.qxbtn.c066x = this.jcqx;
				this.qxbtn.c067x = this.jcqx;
			},
			checkall6() {
				//统计
				this.qxbtn.c039x = this.tjqx;
//				this.qxbtn.c040x = this.tjqx;
				this.qxbtn.c041x = this.tjqx;
				this.qxbtn.c042x = this.tjqx;
				this.qxbtn.c043x = this.tjqx;
				this.qxbtn.c044x = this.tjqx;
				this.qxbtn.c045x = this.tjqx;
				this.qxbtn.c063x = this.tjqx;
			},
			checkall7() {
				//消息通知
				this.qxbtn.c050x = this.xxtz;
				this.qxbtn.c051x = this.xxtz;
				this.qxbtn.c052x = this.xxtz;
				this.qxbtn.c053x = this.xxtz;
				this.qxbtn.c054x = this.xxtz;
				this.qxbtn.c055x = this.xxtz;
				this.qxbtn.c056x = this.xxtz;
				this.qxbtn.c057x = this.xxtz;
				this.qxbtn.c058x = this.xxtz;
			},
			/* 组件的弹框  */
			componentsShow(type, data) { //显示组件

				for(let i in this.portComponents) {
					if(type == this.portComponents[i].type) {
						this.portComponents[i].toggle = true;
						this.portComponents[i].params = data;
						if(this.portComponents[i].data.type == 'single') {
							this.portComponents[i].data.index = data.row.id
						} else if(this.portComponents[i].data.type == 'multiple') {
							this.portComponents[i].data.index = this.multipleDelNum;
						} else if(this.portComponents[i].type == 'add') {
							this.portComponents[i].params = this.vselectwpfxid;
						} else {
							return;
						}
						return;
					}
				}
			},
			componentsHide(setting) { //关闭组件
				this.multipleDeleteDisabled = true
				if(setting.type == "fladd") {
					this.portComponents.fladd.toggle = false;
					if(!setting.cancel) {
						//刷新分类
						this.getcomboxlist();
					}
				} else if(setting.type == "fledit") {
					this.portComponents.fledit.toggle = false;
					if(!setting.cancel) {
						//刷新分类
						this.getcomboxlist();
					}
				} else {

					for(let i in this.portComponents) {
						if(setting.type == this.portComponents[i].type) {
							this.portComponents[i].toggle = false;
							if(!setting.cancel) {
								this.search();
							}
							return;
						}
					}
				}
			}

		}
	}
</script>
<style lang="less" scoped>
	.wrap {
		.qcfd {
			overflow: hidden;
			.xxx {
				ul {
					width: 100%;
					li {
						width: 80%;
						float: left;
						height: 50px;
						text-align: center;
						line-height: 50px;
						border: 1px solid #ccc;
						border-right: none;
					}
				}
			}
		}
		// height: 100%;
		// margin-top: 20px;
	}
	
	.jclt {
		width: 75%;
		height: 50px;
		color: #2E2F2F;
		float: left;
		text-align: center;
		line-height: 50px;
		/*border: 1px solid #CCCCCC;*/
		cursor: pointer;
	}
	
	.wpfltj {
		width: 100%;
		height: 50px;
		float: left;
		background: white;
		font-size: 16px;
		text-align: center;
		line-height: 50px;
		border: 1px solid #CCCCCC;
		cursor: pointer;
	}
	
	.check {
		margin-top: 30px;
		span {
			text-align: right;
			width: 15%;
			height: 50px;
			margin-right: 20px;
			float: left;
		}
		.check1 {
			width: 85%;
			text-align: left;
			.check2 {
				margin-left: 15px;
			}
		}
	}
	
	.bt {
		position: absolute;
		width: 100%;
		height: 50px;
		margin: 0 auto;
		top: 0;
		left: 0;
		background: #50BFFF;
		margin-bottom: 20px;
		color: white;
		text-align: left;
		line-height: 50px;
		font-size: 17px;
		padding-left: 15px;
	}
	
	.tree {
		margin-top: 20px;
	}
	
	.red {
		background: #50BFFF;
	}
	
	.fff {
		background: #ffff;
	}
</style>